<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib prefix="cf" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>思德网</title>
<link rel="stylesheet"  href="${ctx.resource}/front_css/style.css" type="text/css" />
<!--tab js-->
 <script language="javascript" type="text/javascript" src="${ctx}/static/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${ctx.resource}/front_js/jQuery1.7.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var $tab_li = $('#tab ul li');
	$tab_li.hover(function(){
		$(this).addClass('selected').siblings().removeClass('selected');
		var index = $tab_li.index(this);
		$('div.tab_box > div').eq(index).show().siblings().hide();
	});	
});
</script>

   <script src="${ctx}/static/js/vendor/jquery-1.4.2.js"></script>
    <script type="text/javascript">   
  	var pageNo = Number('${pageNo}') ;
	var pageCount= Number('${pageCount}');
	function search() {
		//把表单的数据进行序列化
		$.ajax({
			url:"${ctx}/userInfo/showOrderBypage",
			type:"POST",
			data:{uid:'${uid}',pageNo:pageNo},
			dataType:"json",
			success:function(page){
				$("#name").val();
				$("#starttime").val();
				$("#projectinformation").val();
				$("#pageCount").html(page.totalPage) ;
				$("#totalCount").html(page.total) ;
				$("#pageNo").html(pageNo);
				
				pageCount = Number(page.totalPage);
				var data1 ="" ;
				if(page.datas.length ==0 ){
				data1 += "<tr><td>没有相应数据</td></tr>" ;
				}
				for(var i=0;i<page.datas.length;i++){
					data1 += "<dl><dt>" ;
					data1+="<img src='${ctx.resource}/images/img09.jpg' />";
					data1+="</dt><dd>";          
					data1 +="<p ><h1>"+page.datas[i].name +"</h1></p>" ;
					data1 +="<p >"+page.datas[i].startTime +"</p>" ;
					data1 +="<p >"+page.datas[i].projectinformation+"</a></p>" ;
					// <a href="${ctx }/order/${uid}/${order.spid }/order"><img src="${ctx.resource}/images/pay.PNG" /></a>&nbsp; </p> 
					if(page.datas[i].orderpay==0){
					data1 +="<p align='right'> <a href='${ctx }/order/${uid}/"+ page.datas[i].spid +"/order'>支付</a> "; 
					data1 += "<a onclick='{if(confirm(\"您确定删除此条信息吗?\")){return true;}return false;}' href='${ctx }/userInfo/"+page.datas[i].spid+"/${uid }/delorder' ><font size='5'>删除</font></a>";
					
					}
					else{
					  data1+="已支付";
					}
					data1 += "</p></dd></dl>" ;
				}
				
				$("#shuju").html(data1) ;
			}
		});
	}
		function up(){
		if(pageNo>=pageCount){
			alert("这是最后一页") ;
			pageNo =pageCount ;
		}else{
			pageNo++ ;
			search() ;
		}
	}
	function down(){
		if(pageNo<=1){
			alert("这是第一页") ;
			pageNo =1 ;
		}else{
			pageNo--;
			search() ;
		}
	}
	function show(pageno){
		pageNo = Number(pageno) ;
		search() ;
	}
	function ConfirmDel() {
		if (confirm("真的要删除吗？")){
				return true;
		}else{
			return false;
	}
	}
</script>

<!--弹出层js-->
<script type="text/javascript" src="${ctx.resource}/front_js/tanchu.js"></script>
<script type="text/javascript" src="${ctx.resource}/front_js/jquery.reveal.js"></script>
</head>

<body>
<div class="os-2015">
<!--  
<script type="text/javascript" src="${ctx.resource}/front_js/header.js"></script> -->
<!-- <iframe src="../public/header.html" width="100%" height="144" frameborder="0">
</iframe>-->
<!--center-->
<jsp:include page="header.jsp"></jsp:include>
<div class="center">
<div class="w">
<div class="center-banner">
<div class="center-people">
<dl>
<dt><img src="${ctx.resource}/images/people.png" width="93" height="93" /></dt>
<dd>
<p><%=request.getSession().getAttribute("userid") %> </p>
<p><a href="${ctx }/userInfo/${uid}/reviseuser"><img src="${ctx.resource}/images/center-button01.jpg" /></a></p>
</dd>
</dl>
</div>
</div>
<div class="center-main">
<div class="center-tab">
<div class="tabbox" id="statetab">
			<ul class="tabbtn">
				<li ><a href="http://www.17sucai.com/">我的项目</a></li>
				<li class="selected"><a href="http://www.17sucai.com/">我的订单</a></li>
				<li><a href="http://www.17sucai.com/">我的消息</a></li>
				<li><a href="http://www.17sucai.com/">我关注的项目</a></li>
			</ul><!--tabbtn end-->
			
			<p>${message }</p>
			<div class="tabcon" id="shuju">
	         
	       <c:if test="${totalCount le 0 }">
			<p>目前还没有用户数据</p>
		</c:if>
		<c:if test="${totalCount gt 0}">
			<c:forEach items="${list}" var="order">
			<dl><dt><img src="${ctx.resource}/images/img09.jpg" /></dt>
	          <dd>
	          <p><h1>${order.name }</h1></p>
	          <p>${order.startTime }</p>
	         <p>${order.projectinformation }</p>      
	        <p align="right"> <cf:if test="${order.orderpay ==0}"> <a href="${ctx }/order/${uid}/${order.spid }/order"><font size="5">支付</font></a>&nbsp;
					&nbsp;<a onclick='{if(confirm("您确定删除此条信息吗?")){return true;}return false;}' href="${ctx }/userInfo/${order.spid }/${uid }/delorder" ><font size="5">删除</font></a>
			</cf:if>
			<cf:if test="${order.orderpay==1}"> <font size="5">已支付</font></a>&nbsp;</cf:if>
					
			 </p>                
			</dd></dl>
			</c:forEach>
		</c:if>
       </div>                    
                    
   

<table align='right' width="95%" height="41" ><tr><td >共<b><font color='FA8100' id="totalCount">${totalCount}</font>
</b>条信息&nbsp;&nbsp;<b><font color='FA8100'>${size }</font>
</b>条信息/页&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:show('1')"  style="text-decoration:none;">首页</a>
&nbsp;&nbsp;<a href="javascript:down()" style="text-decoration:none;">上一页</a>&nbsp;&nbsp;
<a href="javascript:up()"  style="text-decoration:none;">下一页</a>  
<a href="javascript:show('${pageCount } ')"  style="text-decoration:none;">尾页</a>&nbsp;&nbsp;&nbsp;&nbsp;页次：<strong><font color=FA8100 id='pageNo'>${pageNo}</font>/<font color=FA8100 id="pageCount">${pageCount }</font></strong>页
&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr></table>


</div>	
		
<script type="text/javascript" src="${ctx.resource}/front_js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">

//ajax 选项卡
$('#ajaxtab .tabbtn li a').click(function(){
	var thiscity = $(this).attr("href");
	$("#ajaxtab .loading").ajaxStart(function(){
		$(this).show();
	}); 
	$("#ajaxtab .loading").ajaxStop(function(){
		$(this).hide();
	}); 
	$('#ajaxtab .tabcon').load(thiscity);
	$('#ajaxtab .tabbtn li a').parents().removeClass("current");
	$(this).parents().addClass("current");
	return false;
});
$('#ajaxtab .tabbtn li a').eq(0).trigger("click");

//tab plugins 插件
$(function(){
	
	//选项卡鼠标滑过事件
	$('#statetab .tabbtn li').mouseover(function(){
		TabSelect("#statetab .tabbtn li", "#statetab .tabcon", "current", $(this))
	});
	$('#statetab .tabbtn li').eq(0).trigger("mouseover");
	
	//选项卡鼠标滑过事件
	$('#clicktab .tabbtn li').click(function(){
		TabSelect("#clicktab .tabbtn li", "#clicktab .tabcon", "current", $(this))
	});
	$('#clicktab .tabbtn li').eq(0).trigger("click");

	function TabSelect(tab,con,addClass,obj){
		var $_self = obj;
		var $_nav = $(tab);
		$_nav.removeClass(addClass),
		$_self.addClass(addClass);
		var $_index = $_nav.index($_self);
		var $_con = $(con);
		$_con.hide(),
		$_con.eq($_index).show();
	}
	
});
function submitt(path)
{
	  $('form1').action(path);
 	  $('form1').submit(path);
}
</script>
</div>
<div class="center-list">
<span>推荐给我的项目</span>
<dl>
<dt><img src="${ctx.resource}/images/center-img01.jpg" /></dt>
<dd>
<p><a href="">ASDAN精英项目</a></p>
<p><a href="">美国项目</a></p>
</dd>
</dl>
<dl>
<dt><img src="${ctx.resource}/images/center-img01.jpg" /></dt>
<dd>
<p><a href="">ASDAN精英项目</a></p>
<p><a href="">美国项目</a></p>
</dd>
</dl>
<dl>
<dt><img src="${ctx.resource}/images/center-img01.jpg" /></dt>
<dd>
<p><a href="">ASDAN精英项目</a></p>
<p><a href="">美国项目</a></p>
</dd>
</dl>
<dl>
<dt><img src="${ctx.resource}/images/center-img01.jpg" /></dt>
<dd>
<p><a href="">ASDAN精英项目</a></p>
<p><a href="">美国项目</a></p>
</dd>
</dl>
<dl>
<dt><img src="${ctx.resource}/images/center-img01.jpg" /></dt>
<dd>
<p><a href="">ASDAN精英项目</a></p>
<p><a href="">美国项目</a></p>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div style=" clear:both"></div>
<div style="height:30px;"></div>
<iframe src="${ctx.resource}/public/footer_Second.jsp" width="100%" height="510" frameborder="0"> 
</div>
</body>
</html>















